import { Request, Response, NextFunction } from 'express'
import UserModel from '../model/UserModel'
import Back from '../common/Back'

class User {
  public static list = async (req: Request, res: Response, next: NextFunction) => {
    UserModel.getUserList().then((result) => {
      res.json(Back.success(result))
    }, (err) => {
      res.json(Back.fail(err))
    })
  }
}

export default User
